package com.dao.impl;

import com.bean.Bhcase;
import com.bean.UserTopic;
import com.dao.BhcaseDao;
import com.util.AliPool;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public class BhcaseDaoImpl implements BhcaseDao {
    QueryRunner runner =new QueryRunner();
    @Override
    public List<Bhcase> queryBhcase(String sql,Object... obj) throws Exception {
        List<Bhcase> list = null;
        Connection conn= AliPool.getConn();
        list=runner.query(conn,sql,new BeanListHandler<Bhcase>(Bhcase.class),obj);
        conn.close();
        return list;
    }
}
